package com.example.home_stretch;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import org.greenrobot.eventbus.EventBus;

public class Sjzx_fsgb extends AppCompatActivity implements View.OnClickListener {
    private EditText ed_gb;
    private Button fsgb;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sjzx_fsgb);
        initView();
    }
    private void initView() {
        ed_gb = (EditText) findViewById(R.id.ed_gb);
        fsgb = (Button) findViewById(R.id.fsgb);
        fsgb.setOnClickListener(this);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.fsgb:
                //发送广播
                EventBus.getDefault().post(new MessageEvent(ed_gb.getText().toString()));
                finish();
                break;
        }
    }
}
